package summary;

/**
 * @Author: 海琳琦
 * @Date: 2022/4/5 19:18
 */
public class Sword11 {

    public int minArray(int[] numbers) {
        int left = 0;
        int right = numbers.length - 1;
        while (left < right) {
            int mid = left + (right - left) / 2;
            if (numbers[mid] > numbers[right]) {
                left = mid + 1;
            } else if(numbers[mid] < numbers[right]){
                right = mid;
            }else{
                right--;
            }
        }
        return numbers[left];
    }

    public static void main(String[] args) {

    }
}
